<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
        <link rel="stylesheet" type="text/css" href="css/tabelas.css" />
    </h:head>
    <h:body>
        <h:form>
            <div>
                <table>
                    <tr>
                        <td>Nome:</td>
                        <td><h:inputText value="#{nota.nota.nome}" /></td>
                    </tr>
                    <tr >
                        <td >Sobrenome:</td>
                        <td ><h:inputText value="#{nota.nota.sobrenome}" /></td>
                    </tr>
                    <tr >
                        <td>Nota:</td>
                        <td><h:inputText value="#{nota.nota.nota}" /></td>
                    </tr>
                    <tr>
                        <td>
                     <h:commandButton action="#{nota.adicionar}" value="Incluir" />
                        </td>
                    </tr>
                </table>
            </div>
           

            <h:dataTable styleClass="tabela" rowClasses="linha-par, linha-impar" value="#{nota.notas}" var="notasx" headerClass="cabecalho-tabela">
                <h:column>
                    <f:facet name="header">
                        Nome
                    </f:facet>
                    #{notasx.nome}
                </h:column>
                <h:column>
                    <f:facet name="header">
                        Sobrenome
                    </f:facet>
                    #{notasx.sobrenome}
                </h:column>
                <h:column>
                    <f:facet name="header">
                        Nota
                    </f:facet>
                    #{notasx.nota}
                </h:column>
                <h:column>
                    <h:commandLink action="#{nota.aumentarNota(notasx)}">
                        <h:graphicImage url="/img/up_arrow.png" height="40px" width="40px"/>
                    </h:commandLink>
                </h:column>
                <h:column>
                    <h:commandLink action="#{nota.deletarNota(notasx)}">
                        <h:graphicImage url="/img/delete_item.png" height="40px" width="40px"/>
                    </h:commandLink>
                </h:column>
            </h:dataTable>
        </h:form>
    </h:body>
</html>

